import React, { useEffect, useState } from 'react';
import { useHistory } from "react-router-dom";
import {
    Modal, Toast, Picker, Button, List, TextareaItem,Switch,InputItem,DatePicker,Radio
} from 'antd-mobile';
import Input from "../../../components/input/Input";
import { dateFormat } from "../../../model/code";
import http from "../../../model/http";
import code from "../../../model/code"; 
import Header from "../../../components/header/Header";

import './index.less'

// import Vconsole from 'vconsole'
// const vConsole = new Vconsole()
const Item = List.Item

function Add() {

    
    const history = useHistory();

    const pp2 = '点击选择';
    const [areaPP,setareaPP]=useState("点击选择") 

    const [infoPP,setinfoPP] =useState("点击选择")

     const [searchV ,setSearchV ] =useState("")

    
    // 联系号码
    
    const [phone,setPhone] =useState("")
   
    
    // 客户姓名
    const [name,setName] =useState("")

    //区域来源
    let data1 = require('./area')
    const [area,setArea] = useState(data1.default.data)
    //选择的区域id
    const [areaId,setAreaId] = useState([])



   
    // 信息来源
    let data= require('./info')
    const [informedway,setInformedway]=useState(data.default.data)
    //信息来源 id
    const [infoValId, setInfoValId] =useState([])

    const setInfoValIdClick= (v)=>{
        window.localStorage.setItem("info",JSON.stringify(v))
        console.log("v",v)
        setInfoValId(v)
    }
  
    //性别
    let list=[
        {label:'男',value:'1'},
        {label:'女',value:'0'}
    ]
    const [sexList, setSexList] =useState(list)
    const [sex, setSex] =useState([])

    const setSexClick = (v)=>{
        console.log(v)
        window.localStorage.setItem("sex",JSON.stringify(v))
        setSex(v)
    }
    
    const [customerId , setCustomerId] =useState("")

    // 年龄
    let data3 = require('./age')
    let [ageList,setAgeList] = useState(data3.default.data)
    const [ageId,setAgeId] = useState('')

    const setAgeIdClick= (v)=>{
        window.localStorage.setItem("age",v)
          setAgeId(v)
    }


    // 诉求项目
    const [projectNameStr,setProjectNameStr] = useState("尚未选择,点击选择")
    //选择诉求列表
    const [projectList,setProjectList]= useState([])

    // 刚需状态
    let stateList =[
        {
            label:"是",
            value:'1'
        },
        {
            label:"否",
            value:'0'
        }
    ]
    //开发人 JSON.parse(window.localStorage.getItem('userRole')).name||""
    const [develop,setDevelop]=useState(JSON.parse(window.localStorage.getItem('userRole')).name)
    
    let [stateLists,setStateList] = useState(stateList)
    const [stateId,setStateId] = useState([])
    const stateChange = (v)=>{
         window.localStorage.setItem("stateId",JSON.stringify(v))
         setStateId(v)
    }





    //受理类型

    let lxList= require("./lx").default.data
    let [sllx ,setSllx ] =useState( lxList  )
    let [lxId , setLxId] =useState([])


    const lxChange = (v)=>{
        window.localStorage.setItem('lxId',JSON.stringify(v))
        setLxId(v)
    }

    //了解程度
    let unLists =require("./underStand").default.data
    let [unList,setunList] =useState(unLists)
    let [unId,setUnId] = useState([])

    const unChange =(v)=>{
        window.localStorage.setItem('unId',JSON.stringify(v))
        setUnId(v)
    }

    //客户诉求描述
    let [suqiumiaosu,setSuqiumiaosu] = useState()
    
    //方案设计
    let [fangansj ,setFangansj] = useState()

    //其他备注
    let [other,setOther] =useState("")

    // 控制 隐藏
    let [show,setShow] = useState()

   
    
  
    useEffect(async () => { 
       
        if(window.localStorage.getItem("tempSuqiu")!='' && window.localStorage.getItem("tempSuqiu")!=undefined && window.localStorage.getItem("tempSuqiu")!=null){
            console.log("value123",window.localStorage.getItem("tempSuqiu"))
            setProjectNameStr("点击重选")
            setProjectList(JSON.parse(window.localStorage.getItem("tempSuqiu")).data.slice(0,3))
        }

        if(window.localStorage.getItem("temp_customer_id")!='' && window.localStorage.getItem("temp_customer_id")!=undefined && window.localStorage.getItem("temp_customer_id")!=null){
            setCustomerId(window.localStorage.getItem("temp_customer_id")||"")
        }

        if(window.localStorage.getItem("phone")!='' && window.localStorage.getItem("phone")!=undefined && window.localStorage.getItem("phone")!=null){
            setPhone(window.localStorage.getItem("phone")||"")
        }
        if(window.localStorage.getItem("name")!='' && window.localStorage.getItem("name")!=undefined && window.localStorage.getItem("name")!=null){
            setName(window.localStorage.getItem("name")||"")
        }

        if(window.localStorage.getItem("areaId")!='' && window.localStorage.getItem("areaId")!=undefined && window.localStorage.getItem("areaId")!=null){
            setAreaId(JSON.parse(window.localStorage.getItem("areaId")) )
        }
        if(window.localStorage.getItem("info")!='' && window.localStorage.getItem("info")!=undefined && window.localStorage.getItem("info")!=null){
            setInfoValId(JSON.parse(window.localStorage.getItem("info")) )
        }
        if(window.localStorage.getItem("sex")!='' && window.localStorage.getItem("sex")!=undefined && window.localStorage.getItem("sex")!=null){
            setSex(JSON.parse(window.localStorage.getItem("sex")) )
        }
        if(window.localStorage.getItem("age")!='' && window.localStorage.getItem("age")!=undefined && window.localStorage.getItem("age")!=null){
            setAgeId(window.localStorage.getItem("age"))
        }

        // stateId

        if(window.localStorage.getItem("stateId")!='' && window.localStorage.getItem("stateId")!=undefined && window.localStorage.getItem("stateId")!=null){
         
            setStateId(JSON.parse(window.localStorage.getItem("stateId")))
        }

        if(window.localStorage.getItem("lxId")!='' && window.localStorage.getItem("lxId")!=undefined && window.localStorage.getItem("lxId")!=null){
            setLxId(JSON.parse(window.localStorage.getItem("lxId")) )
        }
        
        if(window.localStorage.getItem("unId")!='' && window.localStorage.getItem("unId")!=undefined && window.localStorage.getItem("unId")!=null){
            setUnId(JSON.parse(window.localStorage.getItem("unId")) )
        }

        // setSuqiumiaosu
        if(window.localStorage.getItem("suqiumiaosu")!='' && window.localStorage.getItem("suqiumiaosu")!=undefined && window.localStorage.getItem("suqiumiaosu")!=null){
            setSuqiumiaosu(window.localStorage.getItem("suqiumiaosu") )
        }


        // fangansj
        if(window.localStorage.getItem("fangansj")!='' && window.localStorage.getItem("fangansj")!=undefined && window.localStorage.getItem("fangansj")!=null){
            setFangansj(window.localStorage.getItem("fangansj") )
        }
        //other

        if(window.localStorage.getItem("other")!='' && window.localStorage.getItem("other")!=undefined && window.localStorage.getItem("other")!=null){
            setOther(window.localStorage.getItem("other") )
        }


        if(window.localStorage.getItem("show")!='' && window.localStorage.getItem("show")!=undefined && window.localStorage.getItem("show")!=null){
            setShow(window.localStorage.getItem("show") )
        }else{
            setShow(0)
            // setSex(['0'])
            // setareaPP("321")
        }

        // if(window.localStorage.getItem("tempForm")!='' && window.localStorage.getItem("tempForm")!=undefined && window.localStorage.getItem("tempForm")!=null){
        //     setPhone(JSON.parse(window.localStorage.getItem("tempForm")).phone||'')
        //     setName(JSON.parse(window.localStorage.getItem("tempForm")).name||'')
        //     setAreaId(JSON.parse(window.localStorage.getItem("tempForm")).areaId||[])
        //     setInfoValId(JSON.parse(window.localStorage.getItem("tempForm")).infoValId||[])
        //     setSex(JSON.parse(window.localStorage.getItem("tempForm")).sex||[])
        //     setAgeId(JSON.parse(window.localStorage.getItem("tempForm")).ageId||[])
        // }
           
      
	
         
    }, [])

    const clear=()=>{
        window.localStorage.removeItem('tempSuqiu')
        window.localStorage.removeItem('phone')
        window.localStorage.removeItem('name')
        window.localStorage.removeItem('areaId')
        window.localStorage.removeItem('info')
        window.localStorage.removeItem('sex')
        window.localStorage.removeItem('age')
        window.localStorage.removeItem("stateId")
        window.localStorage.removeItem("lxId")
        window.localStorage.removeItem("unId")
        window.localStorage.removeItem('suqiumiaosu')
        window.localStorage.removeItem("fangansj")
        window.localStorage.removeItem("other")
     
        

        setPhone("")
        setName("")
        setAgeId("")
        setAreaId([])
        setSex([])
        setInfoValId([])

        setProjectNameStr("尚未选择,点击选择")
        setProjectList([])
        setStateId([])
        setLxId([])
        setUnId([])
        setSuqiumiaosu('')
        setFangansj("")
        setOther("")

    }
  
    
    //手机号码手动修改
    const phoneChange =(v)=>{
        window.localStorage.setItem("phone",v)
        console.log(v)
        setPhone(v)
    }
    //客户姓名
    const nameChange =(v)=>{
        window.localStorage.setItem("name",v)
        setName(v||"")
    }

    const goSearch=async ()=>{
        if(searchV.replace(/\s*/g,"").length!=11){
            Toast.fail("输入的手机号错误")
            return
        }
        const data = await http.get('/customer/customerUnique',{
            phone:searchV.replace(/\s*/g,"")
        })
        console.log("搜索结果",data)
        if(data.cusnewold == "new"){
            // show == 1 为新 用户
            // show == 2 为老用户
            clear()
            setShow(1)
            window.localStorage.setItem("show","1")
            setPhone(searchV)
            window.localStorage.setItem("phone",searchV)
            Toast.success("查询成功")

            setSex([0+''])
           
        }else if(data.cusnewold =="old")    {
            clear()
            setShow(2)
            window.localStorage.setItem("show","2")
            setPhone(searchV)
            window.localStorage.setItem("phone",searchV)
            Toast.success("查询成功")

            shwOldCustomer(data)
          
        }else{
            clear()
            setShow(0)
            window.localStorage.setItem("show","0")
            Toast.fail(data.msg)
        }
    }
 
    //搜索
    const searchReturn =async (v)=>{
        console.log(v)

        if(v.replace(/\s*/g,"").length!=11){
            Toast.fail("输入的手机号错误")
            return
        }
        // setSearchV(v)
      // http://wxwork.gzsg.cn/wxwork/customer/customerUnique?hosId=1&customerCrmId=123&phone=18951835269
        const data = await http.get('/customer/customerUnique',{
            phone:v.replace(/\s*/g,"")
        })
        console.log("搜索结果",data)
        if(data.cusnewold == "new"){
            // show == 1 为新 用户
            // show == 2 为老用户
            clear()
            setShow(1)
            window.localStorage.setItem("show","1")
            setPhone(v)
            window.localStorage.setItem("phone",v)
            Toast.success("查询成功")

            setSex([0+''])
           
        }else if(data.cusnewold =="old")    {
            clear()
            setShow(2)
            window.localStorage.setItem("show","2")
            setPhone(v)
            window.localStorage.setItem("phone",v)
            Toast.success("查询成功")

            shwOldCustomer(data)
          
        }else{
            clear()
            setShow(0)
            window.localStorage.setItem("show","0")
            Toast.fail(data.msg)
        }
    }
    
    const shwOldCustomer = (customer_data) =>{
        let obj=   {
            "customer_id":customer_data.customer_id,
            "customer_name":customer_data.customer_name,
            "card_no":customer_data.card_no,
            "consult_man":customer_data.consult_man,
            "developer":customer_data.developer,
            "area":customer_data.area||"暂无",
            "area_id":customer_data.area_id,
            "info_source":customer_data.info_source,
            "info_source_name":customer_data.info_source_name||"暂无",
            "sex":customer_data.sex||'1',
            "age":customer_data.age
        }
        setCustomerId(obj.customer_id)
        window.localStorage.setItem("temp_customer_id",customer_data.customer_id)

        setName(obj.customer_name||'')
        window.localStorage.setItem("name",obj.customer_name||'')

        // setDevelop(obj.developer)

        setareaPP(obj.area)
        setinfoPP(obj.info_source_name)

        setAreaId([obj.area_id||""+''])
        window.localStorage.setItem("areaId",JSON.stringify([obj.area_id||""+'']))
        
        setInfoValId([
            obj.info_source+''
        ])
        window.localStorage.setItem("info",JSON.stringify([obj.info_source+'']))



        setSex([obj.sex+''])
        window.localStorage.setItem("sex",JSON.stringify([obj.sex+'']) )



        setAgeId(obj.age)
        window.localStorage.setItem("age",obj.age)
        


        



    }
 


  
    //设置区域来源
    const setCurrentAreaId=(v)=>{
        window.localStorage.setItem("areaId",JSON.stringify(v))
        setAreaId(v)
        console.log(v)

    }

    //跳转到选择诉求 页面
    const jumpSuqiu= ()=>{
        history.push("/user/suqiu")
    }

    //提交 新用户 
    const addSave= async (v)=>{
        // http://wxwork.gzsg.cn/wxwork/customer/customerAdd
        
        if(phone && phone.replace(/\s*/g,"").length == 11){}else{ Toast.fail("电话号码不存在"); return }
        if(name){}else{ Toast.fail("请填写客户姓名"); return }
        if(areaId.length == 0){ Toast.fail("请选择区域来源"); return  }
        if(infoValId.length == 0){ Toast.fail("请选择信息来源"); return  }
        // if(sex.length == 0){ Toast.fail("请选择性别"); return  }
        // if(ageId.length == 0){ Toast.fail("请输入年龄"); return  }

        // if(ageId >60 ||ageId <18){ Toast.fail("年龄格式错误"); return  }

        if(projectList.length == 0){ Toast.fail("请选择诉求项目"); return  }
        if(stateId.length == 0){ Toast.fail("请选择刚需状态"); return  }
        if(lxId.length == 0){ Toast.fail("请选择受理类型"); return  }
        if(unId.length == 0){ Toast.fail("请选了解程度"); return  }
        if(suqiumiaosu){}else{  Toast.fail("请填写客户诉求"); return   }
        if(fangansj){}else{  Toast.fail("请填写方案设计"); return   }

        
        Modal.alert('提示', '是否确认提交?', [
            { text: '取消' },
            {
              text: '确认', onPress: async () => {
                let param={}
               if(show == 1){
                param= {
                    customer_name:  name ||"",
                    area_id:areaId[0],
                    info_source:infoValId[1],
                    sex:sex[0],
                    age:ageId,
                    tel:phone.replace(/\s*/g,""),
                    need_state:stateId[0],
                    accept_type:lxId[0],
                    project_understanding:unId[0],
                    customer_appeal:suqiumiaosu,
                    conceptual_design:fangansj,
                    consult_condition:other,
                    items:projectList
                }
               }

               if(show == 2){
                param= {
                    customer_id:customerId,
                    customer_name:  name ||"",
                    area_id:areaId[0],
                    info_source:infoValId[0],
                    sex:sex[0],
                    age:ageId,
                    tel:phone.replace(/\s*/g,""),
                    need_state:stateId[0],
                    accept_type:lxId[0],
                    project_understanding:unId[0],
                    customer_appeal:suqiumiaosu,
                    conceptual_design:fangansj,
                    consult_condition:other,
                    items:projectList
                }
               }
               
                
                const result = await http.post_json('/customer/customerAdd',param
                )
                if (result.code == 0) {
                    window.localStorage.removeItem('tempSuqiu')
                    window.localStorage.removeItem('phone')
                    window.localStorage.removeItem('name')
                    window.localStorage.removeItem('areaId')
                    window.localStorage.removeItem('info')
                    window.localStorage.removeItem('sex')
                    window.localStorage.removeItem('age')
                    window.localStorage.removeItem('show')
                    window.localStorage.removeItem('stateId')
                    window.localStorage.removeItem("lxId")
                    window.localStorage.removeItem("unId")
                    window.localStorage.removeItem('suqiumiaosu')
                    window.localStorage.removeItem("fangansj")
                    window.localStorage.removeItem("other")
                    window.localStorage.removeItem("temp_customer_id")
                    Toast.success("提交成功")
                    setTimeout(()=>{
                        history.goBack()
                    },1000)
                   
                }else{
                    Toast.fail(result.msg)
                }
                
              }
            }
        ]) 

       






    }



    
   
  
   
    return (
        <div>
            <div className="v-return-visit-add">
                <div className='body-background-div'></div>
                <List className='g-p5-10 g-bg-f g-bdrs12 g-mb10 customer' style={{position:'relative'}}>
                   <Input length='11' type="phone" onChange={(v)=>{ setSearchV(v) }}  onSubmit={(v)=> searchReturn(v)}  placeholder='通过电话号码查询' />
                   <Button  onClick={()=>{goSearch()}} className='searchBtn' style={{position:'absolute',top:'3px',right:'5px',}}>查询</Button>
                   {/* <div className='search'>
                       <InputItem style={{textAlign:"left",height:'30px'}} type='phone' value={searchV} className='searchInput' onChange={(v) =>searchReturn(v)} placeholder='通过电话号码查询'></InputItem>
                       <Button  onClick={()=>{searchReturn()}} className='searchBtn'>查询</Button>
                   </div> */}
                </List>
               

               {/* 新用户 */}
               { show ==1?    
                 <List className='g-p5-10 g-bg-f g-bdrs12 g-mb10 customer'>
                 <div>
                     <div className='jhhfr' style={{marginTop:'6px'}}>
                         <div  style={{textAlign:"left",fontSize:"14px",width:'80px'}}>联系号码:</div>
                         <InputItem    
                                 style={{textAlign:"left",fontSize:"14px",}}
                                 onChange={(v) => {phoneChange(v)}}
                                 type="phone"
                                 placeholder="请输入手机号码"
                                 value={phone}
                             ></InputItem>

                     </div>
                     
                     <div className='jhhfr'>
                             <div style={{textAlign:"left",fontSize:"14px",width:'80px'}}>客户姓名:</div>
                                 <InputItem    
                                        
                                         style={{textAlign:"left",fontSize:"14px",}}
                                         onChange={(v) => {nameChange(v)}}
                                         type="text"
                                         placeholder="请输入客户姓名"
                                         value={name}
                                     ></InputItem>

                             </div>

                   
                             <Picker data={area} cols={1}
                                     value={areaId}
                                     onChange={v=>setCurrentAreaId(v)}
                                     extra={areaPP}>
                                 <Item>区域来源</Item>
                             </Picker>


                             <Picker data={informedway} cols={2}
                                     value={infoValId}
                                     extra={pp2}
                                     onChange={v=>setInfoValIdClick(v)}>
                                 <Item>信息来源</Item>
                             </Picker>
                             <Picker data={sexList} cols={1}
                                     value={sex}
                                     extra={pp2}
                                     format={e=>e.join('-')}
                                     onChange={v=>{ setSexClick(v)  }}>
                                 <Item>性别</Item>
                             </Picker>
                             
                             <div className='jhhfr' style={{marginTop:'6px'}}>
                                <div  style={{textAlign:"left",fontSize:"15px",width:'80px',fontWeight:700,color:'#898989'}}>年龄</div>
                                    <InputItem    
                                            style={{textAlign:"left",fontSize:"14px",}}
                                            onChange={(v) => {setAgeIdClick(v)}}
                                            type="number"
                                            placeholder="请输入年龄"
                                            value={ageId}
                                    ></InputItem>
                             </div>                      
                             <Item wrap extra={develop}>开发人</Item>
                 </div>
                </List>
                
               :<div></div>}
                
                {/* 老用户 */}
               { show ==2?    
                 <List className='g-p5-10 g-bg-f g-bdrs12 g-mb10 customer'>
                 <div>
                     <div className='jhhfr' style={{marginTop:'6px'}}>
                         <div  style={{textAlign:"left",fontSize:"14px",width:'80px'}}>联系号码:</div>
                         <InputItem    
                                 style={{textAlign:"left",fontSize:"14px",}}
                                 onChange={(v) => {phoneChange(v)}}
                                 type="phone"
                                 placeholder="请输入手机号码"
                                 disabled
                                 value={phone}
                             ></InputItem>

                     </div>
                     
                     <div className='jhhfr'>
                             <div style={{textAlign:"left",fontSize:"14px",width:'80px'}}>客户姓名:</div>
                                 <InputItem    
                                         disabled
                                         style={{textAlign:"left",fontSize:"14px",}}
                                         onChange={(v) => {nameChange(v)}}
                                         type="text"
                                         placeholder="请输入客户姓名"
                                         value={name}
                                     ></InputItem>

                             </div>

                   
                             <Picker disabled data={area} cols={1}
                                     value={areaId}
                                     onChange={v=>setCurrentAreaId(v)}
                                     extra={areaPP}>
                                 <Item>区域来源</Item>
                             </Picker>


                             <Picker disabled data={informedway} cols={2}
                                     value={infoValId}
                                     extra={infoPP}
                                     onChange={v=>setInfoValIdClick(v)}>
                                 <Item>信息来源</Item>
                             </Picker>
                             <Picker data={sexList} cols={1}
                                     value={sex}
                                     extra={pp2}
                                     format={e=>e.join('-')}
                                     onChange={v=>{ setSexClick(v)  }}>
                                 <Item>性别</Item>
                             </Picker>
                             
                             <div className='jhhfr' style={{marginTop:'6px'}}>
                                <div  style={{textAlign:"left",fontSize:"15px",width:'80px',fontWeight:700,color:'#898989'}}>年龄</div>
                                    <InputItem    
                                            style={{textAlign:"left",fontSize:"14px",}}
                                            onChange={(v) => {setAgeIdClick(v)}}
                                            type="number"
                                            placeholder="请输入年龄"
                                            value={ageId}
                                    ></InputItem>
                             </div>                      
                             <Item wrap extra={develop}>开发人</Item>
                 </div>
                </List>
                
               :<div></div>}
               

               { show == 1 || show == 2 ? <div>
                  
                <List className='g-p5-10 g-bg-f g-bdrs12 g-mb10 customer'>
                    <div>
                       <div className='jhhfr'>
                            <span>咨询工具:</span>
                            <span style={{marginLeft:'12px'}}>企业微信</span>
                        </div>
                        <div className='jhhfr' onClick={()=>{jumpSuqiu()}}>
                            <span>诉求项目:</span>
                            <span style={{marginLeft:'12px'}}>{projectNameStr}</span>
                        </div>

                        <div style={{textAlign:'center'}}>
                            {
                               projectList.map(item=>(
                                 <div style={{color:'red',fontSize:'14px',marginBottom:'12px'}}>{item.deptName}--{item.item_name}</div>
                               ))
                            
                            
                            }
                        </div>



                        <Picker data={stateLists} cols={1}
                                value={stateId}
                                extra={pp2}
                                format={e=>e.join('-')}
                                onChange={v=>{  stateChange(v)  }}>
                               <Item>刚需状态</Item>
                        </Picker>
                        <Picker data={lxList} cols={1}
                                value={lxId}
                                extra={pp2}
                                format={e=>e.join('-')}
                                onChange={v=>{ lxChange(v)  }}>
                               <Item>受理类型</Item>
                        </Picker>
                        <Picker data={unList} cols={1}
                                value={unId}
                                extra={pp2}
                                format={e=>e.join('-')}
                                onChange={v=>{ unChange(v) }}>
                               <Item>了解程度</Item>
                        </Picker>
                       
                    </div>
               </List>

               <List className='g-p5-10 g-bg-f g-bdrs12' style={{marginTop:'5px'}}>
                    <TextareaItem value={suqiumiaosu} rows={3} count={50} onChange={v => {setSuqiumiaosu(v);window.localStorage.setItem('suqiumiaosu',v) }} className="input-css" placeholder='客户诉求描述...' />
                </List> 
                
                <List className='g-p5-10 g-bg-f g-bdrs12' style={{marginTop:'5px'}}>
                    <TextareaItem value={fangansj} rows={3} count={50} onChange={v => {setFangansj(v);window.localStorage.setItem("fangansj",v)}} className="input-css" placeholder='方案设计...' />
                </List> 


                <List className='g-p5-10 g-bg-f g-bdrs12' style={{marginTop:'5px'}}>
                    <TextareaItem value={other} rows={3} count={50} onChange={v => {setOther(v);window.localStorage.setItem("other",v)}} className="input-css" placeholder='其他备注' />
                </List> 

                 <Button style={{marginTop:'20px'}} className="add-btn" type="primary" onClick={addSave}>提交</Button>
  
                {/* { show == 2 ? <Button style={{marginTop:'20px'}} className="add-btn" type="primary" onClick={addSave1}>提交</Button> : <div></div>} */}
                

            
            
            
               </div> :<div></div>  }
                
             
            </div>
            <Header/>
        </div>
    )
}   
export default Add;